@page
@using EasyAbp.EShop.Products.Localization
@using EasyAbp.EShop.Products.Permissions
@using EasyAbp.EShop.Products.Web.Menus
@using EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.ProductSku
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Layout
@model IndexModel
@inject IPageLayout PageLayout
@inject IHtmlLocalizer<ProductsResource> L
@inject IAuthorizationService Authorization
@{
    PageLayout.Content.Title = L["ProductSku"].Value;
    PageLayout.Content.BreadCrumb.Add(L["Menu:Product"].Value);
    PageLayout.Content.MenuItemName = ProductsMenus.Product;
}

@section scripts
{
    <abp-script src="/Pages/EShop/Products/Products/ProductSku/index.js" />
}
@section styles
{
    <abp-style src="/Pages/EShop/Products/Products/ProductSku/index.css"/>
}
<script>
    let storeId = '@Model.StoreId';
    let productId = '@Model.ProductId';
</script>

<abp-card>
    <abp-card-header>
        <abp-row>
            <abp-column size-md="_6">
                <abp-card-title>@L["ProductSku"] - @Model.ProductDisplayName</abp-card-title>
            </abp-column>
            <abp-column size-md="_6" class="text-right">
                @if (await Authorization.IsGrantedAsync(ProductsPermissions.Products.Create))
                { 
                <abp-button id="NewProductSkuButton"
                            text="@L["CreateProductSku"].Value"
                            icon="plus"
                            button-type="Primary" />
                }
            </abp-column>
        </abp-row>
    </abp-card-header>
    <abp-card-body>
        <abp-table striped-rows="true" id="ProductSkuTable" class="nowrap">
            <thead>
            <tr>
                <th>@L["Actions"]</th>
                <th>@L["ProductSkuName"]</th>
                <th>@L["ProductSkuContentDescription"]</th>
                <th>@L["ProductSkuPrice"]</th>
                <th>@L["ProductSkuInventory"]</th>
                <th>@L["ProductSkuSold"]</th>
            </tr>
            </thead>
        </abp-table>
    </abp-card-body>
</abp-card>